#include "stm32f10x.h"                  // Device header
#include "AS5600.h"
#include "Usart.h"
#include "Pwm.h"
#include "FOC.h"
#include "Motor.h" 
#include "Adc.h"
#include "Data.h"
#include "Can.h"
int count = 0;
int main()
{
	GPIO_En_init();
	uart_init(115200);
	As5600_Init(IIC);
	printf("AS5600初始化\r\n");
	Pwm_Init();
	Motor_init();
	CurrSense_init();
	Delay_ms(1000);
	PID_Vel_Set(0.001,0.05,0,6);
	LOWPass_Init();
	Can_mode_init(CAN_SJW_1tq,CAN_BS2_8tq,CAN_BS1_9tq,4,CAN_Mode_Normal);
	while (1)
	{

		VelocityCloseloop(data[2]);

		
		

	}
}
